package com.sinosoft.main;

import com.sinosoft.listener.AutoConfigListener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Auther: zouren
 * @Date: 2019/5/10 17:23
 * @Description:
 */
@ComponentScan("com.sinosoft")
//组件扫描
@Configuration
//配置控制
@EnableAutoConfiguration
//开启事务
@EnableTransactionManagement
@EnableEurekaClient
public class UserServiceSplitApplication {

    public static void main(String[] args) {
//        SpringApplication.run(UserServiceApplication.class,args);
        SpringApplication springApplication = new SpringApplication(UserServiceSplitApplication.class);
        springApplication.addListeners(new AutoConfigListener());
        springApplication.setWebApplicationType(WebApplicationType.SERVLET );
        springApplication.run(args);
    }
}
